<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:102:"/mnt/client2023/d-crmqing.bigchun.com/fastcrm/public/../application/admin/view/facrm/apps/sms/add.html";i:1676906865;s:88:"/mnt/client2023/d-crmqing.bigchun.com/fastcrm/application/admin/view/layout/default.html";i:1676906865;s:85:"/mnt/client2023/d-crmqing.bigchun.com/fastcrm/application/admin/view/common/meta.html";i:1676906865;s:87:"/mnt/client2023/d-crmqing.bigchun.com/fastcrm/application/admin/view/common/script.html";i:1676906865;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<meta name="referrer" content="never">
<meta name="robots" content="noindex, nofollow">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<?php if(\think\Config::get('fastadmin.adminskin')): ?>
<link href="/assets/css/skins/<?php echo \think\Config::get('fastadmin.adminskin'); ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
<?php endif; ?>

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config); ?>
    };
</script>

    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav') && \think\Config::get('fastadmin.breadcrumb')): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <?php if($auth->check('dashboard')): ?>
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                    <?php endif; ?>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <style>
    .fieldlist dd ins {
        width: 27% !important;
    }
    .fieldlist dd input:first-child {
        width: 100% !important;
    }
    .form-inline .selectpicker{
        width: 100% !important;
        left: 0 !important;
    }
</style>


<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <input id="c-key" type="hidden" data-rule="required"  class="form-control" name="row[key]" value="<?php echo $key; ?>" />
    <div class=" form-group">
        <label for="c-describe" class="control-label col-xs-12 col-sm-2"><?php echo __('短息模板名称'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-describe" data-rule="required" type="text" class="form-control" name="row[describe]" value="" />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('模板编号'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tpl_id" data-rule="required" class="form-control" name="row[values][tpl_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('跟进类型'); ?>:</label>
        <div class="col-xs-12 col-sm-8">

            <?php echo build_select('row[values][record_type]', $recordTypeList,0, ['class'=>'form-control selectpicker', 'data-rule'=>'required']); ?>
            <span class="text-gray"><?php echo __("发送邮件会自动添加一条跟进记录，所以要选择跟进类型"); ?></span>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('参数类型'); ?>:</label>
        <div class="col-xs-12 col-sm-8">

            <?php echo build_select('row[values][param_type]', $modelList,'customer',
            ['class'=>'form-control selectpicker', 'data-rule'=>'required','id'=>'c-param_type']); ?>
            <span class="text-gray"><?php echo __("不能再修改"); ?></span>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('模板参数'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="content-tpl" data-name="row[content]" data-tpl='<?php echo $template_data; ?>'>
                <dd>
                    <ins><?php echo __('参数'); ?></ins>
                    <ins><?php echo __('值'); ?></ins>
                    <ins><?php echo __('默认值'); ?></ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append">
                        <i class="fa fa-plus"></i> <?php echo __('Append'); ?>
                    </a>
                </dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[content]" data-rule="required" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>

            <script id="content-tpl" type="text/html">
                <dd class="form-inline">
                    <ins><input type="text" name="<%=name%>[<%=index%>][value]" class="form-control" value="<%=row.value%>" placeholder="内容"/></ins>
                    <ins>
                        <select class="form-control selectpicker" name="<%=name%>[<%=index%>][key]">
                            <% for(let i in data.tpl){  %>
                            <option value="<%= i %>"><%= data.tpl[i] %></option>
                            <% } %>
                        </select>
                    </ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][def_val]" class="form-control" value="<%=row.def_val%>" placeholder="默认值"/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>

            <!-- <input id="c-content" class="form-control" name="row[content]" type="text"> -->
        </div>
    </div>
    <div class=" form-group">
        <label for="c-tpl_content" class="control-label col-xs-12 col-sm-2"><?php echo __('短息模版内容'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-tpl_content" class="form-control " name="row[values][tpl_content]" ></textarea>
            <span class="help-block">*用于预览短息.支持自定义变量，如客户名称：{:name}</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('状态'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <?php echo build_select('row[status]', [1=>'正常','0'=>'禁用'], 1, ['class'=>'form-control selectpicker', 'data-rule'=>'required']); ?>
            <span class="text-gray"></span>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled"><?php echo __('OK'); ?></button>
            <button type="reset" class="btn btn-default btn-embossed"><?php echo __('Reset'); ?></button>
        </div>
    </div>



</form>








                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
    </body>
</html>
